Fix workspace directory rewrite on OSX