Update package_name() to work with namespace pkgs

The logic in pyramid.path.package_name() should take into
account the fact that namespace packages created by
setuptools do not have __init__.py[c] files, and so they
have no __file__ attribute.

This resolves an issue with WSME
(https://bugs.launchpad.net/wsme/+bug/1221201)

Change-Id: I39bc32a9c38fa11c4cef22a041077ed9001091be
(cherry picked from commit c062d5ace6adedcf0f6434cffc07fb24cc608733)
Spell mistake corrected
Merge pull request #1158 from hariharan-uno/patch-3

Spell mistake corrected
Merge branch 'bug/namespace-packages' of github.com:mattjeffery/pyramid into mattjeffery-bug/namespace-packages