Use pid in temp filename while saving, fixes #21