Implement sync for specified files

Although this implements the feature, it's messy and I feel this code needs some
cleanup before I proceed any further.  This commit will be rebased into
something cleaner in the near future.
Add test stub for upcoming sync feature