Proper checking of arguments re: #333

In lieu of a proper solution to issue #333, we should at least check
the arguments up front and fail cleanly in the unsupported case.

This patch adds said argument checking, along with a test.
Merge pull request #335 from zenhack/headnode_connect_network-check-allocated-status

Proper checking of arguments re: #333