Added messages.py (an ordered dictionary to keep track of messages by name) and dirlock.py (for locking based on the atomicity of mkdir)