Fixed upload function to use “current working directory”