Using os to parse directory paths