This feature was improved in version 0.3.17. So you have to update your installation (and requirements).
To replace a file with sftp you can start ssh-mitm with: ssh-mitm --sftp-handler replace_file --sftp-replace /bin/bash
To replace a file with scp: ssh-mitm --scp-interface replace_file --scp-replace /bin/bash