Adapted as popen can handle no "" in path.