Fix a bug using ELF as output extension
Fix a bug using ELF as output extension

When overriding the OUTPUT_EXT variable in compilation configuration,
bugs appear:

* The bin variable is not None as the 'elf' string is not interned.
* When that is fixed, the function returns None instead of returning the
path of the ELF file.

Signed-off-by: Hugues de Valon <a9b22d551ecd4fafac6f424ca9eafc4fb132330a@arm.com>

kjbracey-arm/mbed,betzw/mbed-os,c1728p9/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,c1728p9/mbed-os,andcor02/mbed-os,andcor02/mbed-os,mbedmicro/mbed,betzw/mbed-os,c1728p9/mbed-os,andcor02/mbed-os,betzw/mbed-os,c1728p9/mbed-os,betzw/mbed-os,mbedmicro/mbed,andcor02/mbed-os,andcor02/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,c1728p9/mbed-os,kjbracey-arm/mbed,c1728p9/mbed-os,betzw/mbed-os,mbedmicro/mbed,andcor02/mbed-os,betzw/mbed-os