Fix getcwd() issue - now current working directory is a state of EnvironmentDetail singleton