Adding staging environment
Adding support for staging environment where necessary. Really need to clean up duplicated attachment code.
Updating deploy scripts
Merge pull request #1076 from elzj/issue_3487_staging_env

Issue 3487: create proper staging environment