Set the path for dir event if argc = 1
Add unistd for extra comptability