add a 'binary' flag to allow saving of non-text files