Various FSDirectory fixes for file locking