Fixed error message on duplicate file. We really, reallly, really need unit tests, at least for the API.