Removed directory check to support using script in submodules as well.