Fix getting current working directory in bootstrap

Use php function rather than exec and a linux cmd