allow trailing slashes to be passed to env.build_dir()