Added FatalError function which conditionally handles an error

I've noticed a common pattern in test code is the standard `if err != nil` block, which fails the test suite by calling `Fatal`:

For example:

    if err != nil {
        c.Fatal(err)
    }

This PR adds a simple function which encapsulates this logic into the `C` struct to make this easier to use.