import sys
import logging

from path import path

try:
    import utility
    def package_path():
        return utility.base_path() / path('plugins') / \
            path('dmf_control_board')
except ImportError:
    def package_path():
        try:
            script = path(__file__)
        except NameError:
            script = path(sys.argv[0])
        return script.parent

logger = logging.getLogger()

from dmf_control_board import *

@@ -56,22 +56,39 @@
     
-import utility
+from app_context import get_app
 %0A   
@@ -127,44 +127,53 @@
 urn 
-utility.base_path() / path('plugins'
+path(get_app().config%5B'plugins'%5D%5B'directory'%5D
 ) / 

Fix avrdude/.hex file path