Refactor handling of paths.

Closes #1.
Fix lint error.