fixed file extension bug (closes #48)