Fix error where destination directory was not correctly formatted