Call setlocale to get non-ASCII chars

XwcLookupString would not return Æ, Ø or Å when these buttons were pressed
without this call.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Fixed input handling code

"Xlib Programming Manual: For Version 11 of the X Window System, Volume 1"
describes proper use in chapter 11.10.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Create file on open if it does not exist

This greatly improves usability.  Previously, the user had to create all new
files with a separate program.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>