Restore fix added by commit 4e22874b691e229d6f151c636b03a7ab5c3f2f7c

Use Dir.pwd instead of `pwd` in update hook