Attempt to fix handling of read/write permissions in 'open' in sqlfs.js
sqlfs's 'open' function is actually barely used, so we can reduce code complexity by removing it altogether.