Safe Tuplespace-based Coordination in Multiagent Systems