Locking - Explicitly acquire a lock depending on the command

Commands which modify instances.yml should acquire a lock before doing
anything.  Commands which merely read may proceed without acquiring the
lock.

This addresses an issue where running "amp sql" interactively causes all
other amp commands to fail.
Merge pull request #14 from totten/master-write-lock

Locking - Explicitly acquire a lock depending on the command