Fixed a crazy problem with PATH

Only OS X and fish users were affected but the new code fixes it.
... As long as no-one adds spaces in these filenames!