Add python-magic for determine the type of file. Update jQuery UI template.