Small optimization that avoids forking a process to retrieve basename Change-Id: I4844ba19525d4a3c7d88cfd6d2f3f3896768a113