Merge pull request #211 from m1ch1/master

statemachine.save: pass fileoutputstream instead of outputstream