Improve the test for ant_exists and maven_exists