copy path for directry strips tailing slash