Replaced path.basename with path.dirname to fix issue #3.

I think this should resolve the File.base issue.