Improve remote compilation system

Add .dvi and .ps support to remote compilation system.