Moved path manipulation to its own place
reattach-to-namespace is a mac-only thing, no pollution is allowed.