Searching for rails executable correctly

Current logic of finding Rails executable in parent directory is not returning full path of   executable if it is found in one of the parent directories.
To compensate for this, we have to call `exec_app_rails` recursively until the executable is found or we can't do `chdir` anymore

This solution finds the full executable path from parent directory recursively