Validate uploaded file

Fixes theodi/shared#139