Avoid mkdir and allocs if disabled

Follow up to #347
This basically prevents the creation of an empty directory if the plugin is disabled.