Default goal to target name if not set.

Added a couple of tests to test that goal is not required.
Minor update to docs.