Cleaner way to set file array index to file basename

Signed-off-by: Elliot Betancourt <elliot@elliotbetancourt.com>