Enables bash strict mode

This casues the script to exit if any command returns false, stopping
the script on unexpected output.

Fixes some commands to stop them returning false if we don't care (ie
removing files that don't exist, creating directories that do exist and
unmounting things that are not mounted).
Makes the script executable
Fixes error when tar extracts to FAT

Makes tar not try to perserve ownership as FAT has no concept of
ownership.
Makes the script always cleanup

This ensures that everything is in the correct state for when the script
gets run again
Merge branch 'master' into feature/strict-mode
Allows the script to run with sudo

There is no reason why this script cannot run as a sudo user and
enforing this makes it impossible to run on systems with teh root
account disabled.
Allows installing to sdcards

Sdcards in some readers show up as mmcblkX and the partitions as
mmcblkXpY, the same format as on the beaglebone. This commit detects if
the device starts with mmcblk and applies the correct partition
regardless of if you use the mmc flag or not.
Fixes unmounting the partition

Uses /etc/mtab to find and unmount only the partition related to the
device that are currently mounted.
Fixes usb devices not working