conditional chdir for OS X resources, revert windows Head changes