Checking perl, creating output folder