define regexp in 1.9 compatible way
tempfiles don't take symbol arguments in 1.9
removed hard dependency on json version to make this compatible with ruby 1.9