Fix some mem leaks, add filesystem utility functions

Also turn down debug menu rendering intensity, in practice it makes it
hard to see your edits.