Fix checking of generator being run from the right directory.