I commuted for awhile on a low-end hybrid. It was OK. But then I bought a medium-grade MTB ($700 bike on sale for $450). After putting slicks on it, it is a pretty good commuter. I now have two sets of wheels: slicks for commuters and knobs for trail riding. Of course I do trail riding maybe 3 times a year.
So I think that if you want one bike that fulfills two needs, then go for the MTB. And consider a second set of wheels if you'll be hitting the trails regularly.