Corrected commenting out of requiretty

Previous regex affected comments containing the text "requiretty"
Corrected echo command

Added missing ending quote. Changed echo to use single quotes, so that
double quotes appear in the file.
Merge pull request #18 from Fydon/upstream1

Fixed preserving environment variables and improved commenting out of requiretty