Use cross-platform absolute path check
Cache getcwd() result