title: pkg_resources doesn't extract files from python egg
body: <p>I created a python egg by running <code>python setup.py bdist_egg</code> from this folder:</p>
  
  <pre><code>SensorDisplay/
  --- sensor_display/
  ----- __init__.py
  ----- can.py
  ----- sensor_display.py
  ----- data/
  --------- sensor_param.txt
  --- setup.py
  </code></pre>
  
  <p>in file <code>setup.py</code>, I have:</p>
  
  <pre><code> package_data = {'' : ['*.txt']},
   scripts = ['sensor_display/sensor_display.py','sensor_display/can.py']
  </code></pre>
  
  <p>and in file <code>sensor_display.py</code>:</p>
  
  <pre><code>PARAM_FILE = "data/sensor_display.txt"
  param_file = pkg_resources.resource_filename("sensor_display", PARAM_FILE)
  f = open(param_file,"r")
  </code></pre>
  
  <p>I obtain then the egg file <code>SensorDisplay-0.1-py2.7.egg</code> in folder <code>SensorDisplay\dist\</code>. However, when I install the egg with easy_install and run the file <code>C:\Python27\Scripts\sensor_display.py</code>, I obtain the following error:</p>
  
  <pre><code>IOError: [Errno 2] No such file or directory: 'C:\\Python27\\lib\\site-packages\
  \sensordisplay-0.1-py2.7.egg\\EGG-INFO\\scripts\\data\\sensor_param.txt'
  </code></pre>
  
  <p>It seems function <code>resource_filename</code> doesn't extract the egg-file because the filename returned considers the egg-file as a directory which it is not.</p>