I haven't worked for the government, and I'm not exactly sure what you mean by "contractor contract", but it doesn't exactly sound like the government is breaking its own rules if they choose to hire you for the position. It sounds like it's a fixed term contract, which is pretty normal in my experience.
Anyway, for what it's worth --
I contracted for two well known pharma companies for nearly 3 years before being offered permanent jobs by both of them. Apart from my UK-based postgraduate degree, contracting was really the only way to get UK experience on my CV (...apart from my part-time burrito-rolling gig, which, never did make the cut!)
I think as a foreigner, it can sometimes be hard to prove to an employer that it's OK for you to be hired for a permanent position, when your visa has an expiry date on it; to them it represents a risk, so yes -- you won't get benefits like a pension/healthcare/etc as a contractor, but you get UK-based experience and references for the next job that you apply for, which in many instances, is invaluable.
You say the pay isn't exactly attractive, but maybe that's just a difference between the UK/US? I'm not sure what field you're in and what to expect, but I suggest researching the going rate for the type of work you'll be doing and see how it compares, because from my understanding there are some fields where the difference between countries is seriously shocking.
Also, there are companies known as "Umbrella Companies" that employ contractors -- and deduct taxes from your pay rather than you having to sort it out yourself. I'm not sure if it's possible for you to go that route, but some I know are: Brookson, Parasol, Tarpon, but there are more. I did this once -- I applied (and was selected) for the job through a recruitment agency, who offered a less than ideal rate. I asked them about it, explaining that it would be a significant pay cut and I wouldn't necessarily be able to take the job at such a low wage. They informed me of the Umbrella companies, which, if employed by them I'd make a rate that was £4/hr better than that offered by the recruiter-- for the same job! The only real difference on my end was that Recruiter - included paid holidays. Umbrella - Didn't include paid holidays, but I could claim expenses (travel and food -- with travel costing in excess of £300/month). Going through the calculations, it made sense for me to be employed through the umbrella company. -- So this may be a question worth asking if you get to that stage.
Also-- 1 hour is a pretty standard London commute. Door to door, I currently travel 1 hour 20 mins. My OH travels 1 hour, 5 minutes. We work in the complete opposite directions of where we live. Before we moved to our current flat, I used to commute 2 hours 15 minutes each way....to work as a contractor with no job security and no benefits. Was it worth it? To me, all things considered? Yes.
But, as always-- YMMV.