Fixed 'command script import' by eliminating the shadowing of basename.

Reviewed by: Daniel Malea