Avoid duplicating functionality.

Should the resolution of figuring out paths need to change, this keeps the refactor cost in one place.
Merge pull request #31 from kezabelle/master

Avoid duplicating functionality.