comment and spacing issues fixed

handled the case of a directory or a non-sh file being passed in