Added searching in the current directory for executable file.

The searching of path had a bug where the current directory was not
searched, this change searches the current directory before going down
the searching path.