Changed capistrano version to 3.1.0 since there was a conflict with capistrano-rails which is using capistrano -v3.1.0.

Also, fix the space bug for capture command.