fixed baseDir determination

Fixed the baseDir, if your cwd is NOT the magento root directory

This is the case if you run PHPUnit ie. from the PHPStorm IDE