// Attempt to run external command
try {
final File md = File.createTempFile("tmp", ".md");
FileUtils.write(md, text);
Process process = new Process(cmd+" "+md.getAbsolutePath());
process.run();
int ok = process.waitFor(10000);
if (ok != 0) throw new FailureException(cmd+" failed:\n"+process.getError());
String html = process.getOutput();
FileUtils.delete(md);
return html;