functions code now uses absolute paths

sometimes the code was not in the correct dir causing the function to be
re downloaded or not function. Now using absolute paths to make sure the
script uses the correct dir