I think that its very very rare for someone to go to a job interview and be the absolute ideal candidate for that job. In any new job you are bound to be facing situations/equipment etc you are not familiar with, at least in part.
A good interviewer will recognise potential in an applicant as much as they will recognise ability.
Be honest, confident and keen and you'll have done as much as you can do.
If they ask an awkward question, it is usually to see how you react to pressure as much as it is seeing what your answer is.
If you don't get the job then don't get too disheartened, it just wasn't for you. I don't know about the US but in the UK it is law that interviews must take place for any position (to do with equal rights legislation). Because of this, a lot of interviews happen when the company already know who is going to get the job. They are just paying lip service to the legislation.
This is a pain but its just the way it is. I went for quite a few interviews where I didn't get the job, mainly because I would work myself up before the interview and be too nervous when I went in there. I knew that I could do the job but probably didn't put that across as well as I should have.
After about 5 unsuccessful interviews I started going in to them with a "if I get it, I get it, if I don't, I don't" attitude and this helped my confidence. The next 4 interviews I did resulted in 4 different job offers...
Good luck...