Stringify pathname for spawn