Begin file checks to determine if directory or file