Slightly modify OSX path code but shouldn't change anything.