Moved devices code to device directory
Changed build logic to handle subdirectories

I don't like how the object entry in the subdirectory miml files
are handled - it is currently subdir/object.o where it should just
be object.o. It's late and I don't see any immediatly obvious way
of fixing it so this is the way it is for now.