Change UserPreferencesFilePaths using Python

Does anyone know how to change the script directory in the user preferences using Python from command line?

I believe it has something to do with bpy.types.UserPreferencesFilePaths, but I'm not sure how to use it.

import bpy