Reliable path for add-on data storage
Set it once in the addons User Preferences.
Suggest using a property in  addon preferences  The user chooses the folder.  I had deleted this answer, as it is not &quot;automatic&quot;, however setting a storage location once,  is IMO, not a huge overhead.
Modify the script in link with a folder property
class ExampleAddonPreferences(AddonPreferences):
    # this must match the addon name, use '__package__'
    # when defining this in a submodule of a python package.
    bl_idname = __name__

    assets_folder = StringProperty(
            name=&quot;Assets Folder&quot;,
            subtype='DIR_PATH',
            )

    def draw(self, context):
        layout = self.layout
        layout.label(text=&quot;This is a preferences view for our addon&quot;)
        layout.prop(self, &quot;assets_folder&quot;)


And then when you need to access it
    preferences = context.preferences
    addon_prefs = preferences.addons[__name__].preferences

    assets_folder = addon_prefs.assets_folder