Add missing dependencies and make work with Tempfile on 1.8.7