output should support files of other type, fix #838

https://github.com/spmjs/spm/issues/838