debug.h: Check return value from vasprintf

This silences warnings (#5) and prevents possible memory errors in the case
of a failure.