Improves build file directory handling