fix: extname must returns nil if file extension was not found.