umockdev-record: Resolve links

We need this to properly determine parent devices. This was erroneously dropped
in the port to Vala.

NB that realpath() doesn't currently work in the test suite, so add a
workaround if it fails. Apparently realpath() from Vala uses a slightly
different glibc call than realpath() from Python, and our preload library
doesn't get along with that.