Handle bad input for xframe, add relevant Mocha tests

Partially addresses #12; only addresses it for the `xframe` method for now.