add trim function
added slash in snapshot directory; found and corrected a memory leak; snaphot file name is now the rom name without parenthesis
Merge branch 'master' of https://github.com/odrevet/TGFE