title: ImportError when using console_scripts in setuptools
body: <p>I am trying to build a program called <code>dnsrep</code> in Python, I am using setuptools so that I can call the <code>dnsrep</code> module without using the command <code>python dnsrep</code>. The <code>setup.py</code> script I wrote is given below:</p>
  
  <pre><code>from setuptools import setup, find_packages
  
  setup(
      name='dnsrep',
      version='0.1',
      description='Program that gives a reputation score to url\'s\n.',
      entry_points = {
          'console_scripts': ['dnsrep = dnsrep:main']
      },
      zip_safe=True,
  )
  </code></pre>
  
  <p>I install the module by using the command:</p>
  
  <pre><code>python setup.py install
  </code></pre>
  
  <p>My module gets registered but when I run it I get the error:</p>
  
  <pre><code>Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/bin/dnsrep", line 9, in &lt;module&gt;
      load_entry_point('dnsrep==0.1', 'console_scripts', 'dnsrep')()
    File "build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py", line 521, in load_entry_point
    File "build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py", line 2632, in load_entry_point
    File "build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py", line 2312, in load
    File "build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py", line 2318, in resolve
  ImportError: No module named dnsrep
  </code></pre>