Fixes RHBZ#1544361
In Rawhide (to be Fedora 28) our current ELF header is not sufficient
and possible executable bit for a file is dropped:
*** WARNING: ./usr/lib/fun.so is executable but has empty or no shebang, removing executable bit
Extended the make_elf() to add one more byte into the header and added
some tests, most importantly to check if file permission stays in place.