Updated to exclude tmp directory