Fix for issue #19 with password_reset function

Ok, I tested the fix I made for the issue #19 with the password reset and it seems to be working fine. Now the function `update_file` needs also to know the `filetype` so it will do the appropriate operations.