Check for '.' and '..' is unnecessary.