Work around a bug in dash on Ubuntu by checking the number of arguments before shift...