Surely you just charge your hourly rate.  Thats what i do and then never get stung. I get paid for the amount of time i am there. 
I'd never let anyone know my hourly rate. 
Especially not a client. 
Piece work, everybody knows where they stand then. 
If after an hour or so you're not where you want to be either suck it up and treat it as a learning curve or renegotiate.
JMO