Utilties for using Lua with external commands