Fix for missing directory separator on Linux (Ubuntu 14.04) and also set the temp dir to the unique session directory so there is no conflict when multiple sessions are running concurrently.