Hmm.  I was looking at using fileManager's getExtension() rather than my own fix, but it seems like it has the same problem?

/**
	 * Parse file extension from file name.
	 * @param string a valid file name
	 * @return string extension
	 */
	function getExtension($fileName) {
		$extension = '';
		$fileParts = explode('.', $fileName);
		if (is_array($fileParts)) {
			$extension = $fileParts[count($fileParts) - 1];
		}
		return $extension;
	}

Seems like parseFileExtension($fileName) { } might be construed to have the same problem, e.g. if uploaded file is named "png".