Fix and use requirements.txt
Better filetype detection. Fix #99