Add UID to state retention file path

Add the UID of the invoking user to the state retention file path.  This
helps solving permission issues when different users run the same
plugin.