Catch ExecutionError for Scala compilation

Also makes compile output dependent on "debug" system property, instead
of hardcoding it.