Resolved jeremieca's problem in issue #293.
Added basepath option, enabling relative paths (fixes #293).
Merge pull request #404 from reimund/master

Fix relative path issue #293