Persists the current sections to storagePath as pretty-printed JSON, creating parent directories as needed.