Raise ValueError when passed invalid prefix

We should give meaningful Python errors to assist with user-input
checking. This patch is one step in this direction.

Change-Id: I95ef423bdc1fcbe1d0e9c3b0395f39a11e3c4ed2
Signed-off-by: Antoni S. Puimedon <asegurap@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/14833
Reviewed-by: Giuseppe Vallarelli <gvallare@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>