Make sure the right capture method is called even if ActiveSupport is loaded (by capistrano_mailer for example).
Don't create a lock when only checking it and not deploying

Previously, calling `cap lock:check` would also create a lock, now the
lock will only be created when running the `deploy` task.