Run external commands on Unix or Windows