python: Split up Device class and add InputFileDevice class.