Fix the TRAVIS_BUILD_DIR path

Use dirname on the path rather than take it as is.