Yes, if the tenancy goes through. If it falls, they'll have to refund it - that's the law.
I'd specifically warn about Littlejohns in Edinburgh though - when I was looking at renting with them they stated in the email that if the tenancy fails, they'd be keeping £175 out of my £200 holding fee.