Implemented file locks so that we don't get stuck in an infinite loop
when the server passes on an updated file to a user's other logged-in
machines.