Improvements

1 - The first change was made in the function definition, because of name, this method was more easy to debug.
2 - Added a ternary, to verify if level exists, if not exists the default value was "../", who means in that context go one level up.
3 - Added a verification to archive if not exists just one empty string was defined, to use inside of path.resolve.
4 - The "out" variable was defined to be more expressive and to return the path with resolution, the resolution was important to this module to work with different platforms.