WIP: fixed fsnFlags race condition on linux

This fixes #102, but only on linux. I'd like to see some comments before fixing it for every platform.