Fixing cwd bug in UNIX FTP

The current working directory was causing some issues in UNIX based FTP. I just added path.basename the the current path to correct the error and also removed the section where the forward slash was added to the path