Add checking for --device, closes #22.