Fix 500 if a file is treated as a path
Merge pull request #251 from gittip/issue250

Fix 500 if a file is treated as a path