Refactor shellescaping to happen in a single place

Adjusted one test because + char should be escaped.
Also removed dependency on OS detection, because Ruby should properly
escape for the OS it's running on. Replaced manual path joining with
File.join for the same reason.