Simply change
var oldPath = files.profilePic.path;
to
var oldPath = files.profilePic.filepath;
Also make sure that you create the "uploads" folder as the code doesn't create it and it will fail without it.
EDIT: A side note is that if your environment is just spitting out [object object] when you console log an object, then probably get a new environment (visual studio code is good) that gives useful information.