Helper behaviors

This change adds some helper behaviors that can be used by downstream
components.  Specifically, this adds the ability to execute a block
with JAVA_HOME set, and makes the copy_resources and download_jar
methods a bit more robust.