Fix a buffer overflow when prepending 0x4 to the public keys

This was causing a crash on 32-bit builds.
Fix leaking the lock_path filename in ntb_ipc