Improve Property exceptions

KeyValError now stores the line number along with the file, and displays
it in the exception message.