Made looking up the patterns file more reliable

Made looking up the patterns file more reliable by using the environment
variable %UserProfile%