Chmod changes.
Added a basic session implementation.
Save when editing the session data.
Moved out the encoding of the values to a separate function to share it.
Fixed up the interface.
No conditionals on the last error.
Added session deletion.