Fix extension parsing in Filename class.