Keep hash and search params when using makeRelPath

Fixes #19