Fix behavior when input/output has no extension.