Make file locking much more correct.

That is, hold the file lock across all operations for
that file, including copying.  This should prevent two
parallel installs from trampling over each other.

Signed-off-by: Chris Lalancette <clalancette@irobot.com>
Update the copyright notices to mention 2014

Signed-off-by: Chris Lalancette <clalancette@irobot.com>