Properly resolve paths relative to the location from which the script is called

This matches the way Browserify resolves paths. Fixes #9.
Merge pull request #16 from Techwraith/paths

Properly resolve paths relative to the location from which the script is called