Add repr() in error message

This adds single quotes to strings and it avoids an error with string
formatting if "name" happens to be a tuple.

See also #31.
Remove superfluous "struct"
Move module constants into cdef

As suggested by @bastibe in #31.