Add CURDIR for script functions