Reverted getFilename

This would give problems if multiple instances are created. Filename is
now dynamically generated based on the serializeToFolder return value.
Use createTempFile to return unique file.

This allows for multiple instances to be created.