cwd() = pwd() 

On my windows build cwd() is undefined and pwd() works just fine...

Maybe this is in order?