Add copyright notice, include comments, and implement path validation routine for xcode-select