Fix extension mapping

Extension mapping did only work for files with a valid metadata EA.
Fixed in #487.