Check that Shiny App is a directory before trying to spawn. Gracefully handle errors on writing to stdin.