Adjust test timeouts and ensure database directory exists before trying to write to it.