Don't listdir when path does not exist.