automatic detection of path to scripts