Fix wal_dir sanitizing