Fixed Update Accounts problem.

The tmp file was only open for reading and not for writing. This was the
problem. Also added fseeks' to seperate input and output on the file.