DRY up path cleaning regexes
Avoid using `eval` to expand tildes in paths

Fixes #119