Use a better runtime dir

We were using ./data, which doesn't make sense as we don't know the
current directory.

Instead, we now use the XDG_RUNTIME_DIR as defined by Freedesktop.org.

This was worked on with Tommy Cheng, Koala Yeung and Mathieu Bridon.