More robust sessionID parsing. 

Now handles sessionID's that are returned with a trailing slash.
Merge pull request #161 from kerryck/session-id-parse

More robust sessionID parsing.