def [](fpath=nil)
      if fpath.nil? || fpath.index('/') == 0
        @rye_current_working_directory = fpath
      else
        # Append to non-absolute paths
        if @rye_current_working_directory
          newpath = File.join(@rye_current_working_directory, fpath)
          @rye_current_working_directory = newpath
        else
          @rye_current_working_directory = fpath
        end
      end
      debug "CWD: #{@rye_current_working_directory}"
      self
    end
def [](fpath=nil)
      if fpath.nil? || fpath.index('/') == 0
        @rye_current_working_directory = fpath
      else
        # Append to non-absolute paths
        if @rye_current_working_directory
          newpath = File.join(@rye_current_working_directory, fpath)
          @rye_current_working_directory = newpath
        else
          @rye_current_working_directory = fpath
        end
      end
      debug "CWD: #{@rye_current_working_directory}"
      self
    end
Change the current working directory (sort of).

 I haven't been able to wrangle Net::SSH to do my bidding.
 "My bidding" in this case, is maintaining an open channel between commands.
 I'm using Net::SSH::Connection::Session#exec for all commands
 which is like a funky helper method that opens a new channel
 each time it's called. This seems to be okay for one-off
 commands but changing the directory only works for the channel
 it's executed in. The next time exec is called, there's a
 new channel which is back in the default (home) directory.

 Long story short, the work around is to maintain the current
 directory locally and send it with each command.

     rbox.pwd              # => /home/rye ($ pwd )
     rbox['/usr/bin'].pwd  # => /usr/bin  ($ cd /usr/bin && pwd)
     rbox.pwd              # => /usr/bin  ($ cd /usr/bin && pwd)