add compatibility for capistrano 3

deploy doesn't work on capistrano 3, adding small improvements for compatibility.