I believe this is by far the best way to handle it as well, but I did recently read a book that brought up an interesting point.
The line above is almost always the justification given. But, what if those ten were murderers, and by letting those ten escape, each one ended up killing another innocent? Now in your efforts to stop one innocent from going to prison, ten innocents have died, versus the one that would have been falsely imprisoned otherwise.
...
Utilitarian arguments (to which I adhere to, in general) are hard. There are so many consequences, including ones that are not immediate.
With putting people under arrest we often go for recall. Yes, it is a nasty experience for an innocent, but at the same time, it may avoid the case you mentioned.
Which long-term consequences? First, just because someone is a murderer, does not mean he/she is going to go on a rampage. Second, if precision is high, people can trust the system in the long term, and give some feeling of safety. Compare it with a lynch mob scenario, where it is easy to mishandle justice (and, long term, a lot of innocent are at risk).
"It is better that ten guilty persons escape than that one innocent suffer."
In the language of statistics, it is a trade-off between precision vs recall. In general, we cannot create a system that makes sure no innocent is behind the bars (other than not convicting anyone).