Use `KeyError` instead of `exceptions.KeyError`

Using `exceptions.KeyError` will lead to a `NameError`. `KeyError`
should be used instead because `KeyError` is already in builtins
namespace and because the exceptions module is not present in Python 3.

This fixes #483.