Inotify asset updating

Obsoletes #52, improved version with multi-event support and more error checking.
Also fixes the rendering bugs.

Please review and test, try painting on terrain tiles and buildings.