fix string escaping for environment variables in bash-like environments

fix string escaping environment variables in bash like environments see #103