create_environment tests to work on older cmake

Also simplified how path is checked.