Better std::string argument passing

(see http://stackoverflow.com/questions/17024519/stdstring-or-const-stdstring-argument-the-argument-is-internally-copi)