Add magic support for direct operation on files

Things that work now: (in any combinations)
- `./build.sh debian`
- `./build.sh debian:sid`
- `./build.sh ../library/debian`
- `./build.sh ../library/debian:sid`