converted mnesia use to transactions instead of dirty_write, restructured filesys remove/remove_file/remove_dir