ajout des restrictions memory et loadavg
Improvement: "cd" to the directory containing the target function.

This is helpful in cases where relative paths are used.