fix ISSUE 51

fixes Issues/51 via usage of std::vector for argv and std::for_each(argv.begin(), argv.end(), &free)