Updating `is_executable` function.

Using built-in `is_file` function rather than `os.path.isfile`.