Refactor filename saving from morph.py

This fixes #21