Cleaned up the sanity checks on files, dirs, and file types.