Secure source code

RIPS analysis indicated possible vulnerability with this function.
Added md5 and microtime to rename the file preventing user-input from
touching filesystem.