takes `baseDir` value from environment variable

I had to do this update because of problems when run my app on AWS ElasticBeanstalk. They have node_modules folder as a link to other location that's why calculation of `baseDir` pointed to wrong directory. Obvious fix for such specific situation is to take `baseDir` value from environment variable.