Fix for Mac

Cache the current working directory to avoid a weird error under Mac