Please use the session interface (https://github.com/owncloud/core/blob/master/lib/session/session.php) instead of `$_SESSION`

i.e. OC::$session->get('dir')