diff --git a/decloud/core/system.py b/decloud/core/system.py
index 8114052489da3a761ade056f9003ab5716e5c3ba..0b9f47558187daaea4af12b43c058f87da969973 100644
--- a/decloud/core/system.py
+++ b/decloud/core/system.py
@@ -84,16 +84,7 @@ def get_files(directory, ext=None):
 
 def new_bname(filename, suffix):
     """ return a new basename (without path, without extension, + suffix) """
-    filename = filename[filename.rfind("/"):]
-    filename = filename[:filename.rfind(".")]
-    return filename + "_" + suffix
-
-
-def pathify(pth):
-    """ Adds posix separator if needed """
-    if not pth.endswith("/"):
-        pth += "/"
-    return pth
+    return pathlib.Path(filename).stem + "_" + suffix
 
 
 def mkdir(pth):