Use rename rather than unlink for a safer dbcompact.
Merge branch 'master' into safer-dbcompact
Merge pull request #606 from mapbox/safer-dbcompact

Use rename rather than unlink for a safer dbcompact