Remove paths from temp and core folders right before returning the response.