Fix cd'ing into directories
Fix environment variables for Ruby < 1.9
Fix issues with quotes around string
Fix test when using .ruby-version on system