Avoid deleting script's containing directory and avoid Strict Standards warning