Lock the session file when opening it

This seems to be a copy+paste mistake from https://github.com/php/php-src/blob/master/ext/session/mod_files.c#L157-L168.