The UEFI specification say that the minimum size for the GPT partition
entry array is 16384 bytes. This place the first usable LBA at 34 for
a 512 bytes sector drive and at 6 for a 4K one for example.
Add this minimum size to the calculation of the gpt metadata size.
Update the tests files for the new gpt calculation and while here fix
the tests Makefile to use the correct script.