Avoid tests to fail because of create_session tests when there is unexpected output somewhere else (e.g. a debugging print statement).
Resolving tmpdir in cd tests to realpath. See #259.