Raise error if agread fails (returns null pointer)

Add exception handling for agread so it raises a Python error if the read fails.

Addresses #30