getVar :: String -> String -> IO (Maybe String)
getVar var end = do home <- safeGetEnv var
                    mgetHome ('/':end) home
    where mgetHome :: String -> Maybe String -> IO (Maybe String)
          mgetHome _   Nothing  = return Nothing
          mgetHome end (Just h) = return $ Just $ h ++ end
getVar :: String -> String -> IO (Maybe String)
getVar var end = do home <- safeGetEnv var
                    mgetHome ('/':end) home
    where mgetHome :: String -> Maybe String -> IO (Maybe String)
          mgetHome _   Nothing  = return Nothing
          mgetHome end (Just h) = return $ Just $ h ++ end
getVar var end = do home <- safeGetEnv var
                    mgetHome ('/':end) home
    where mgetHome :: String -> Maybe String -> IO (Maybe String)
          mgetHome _   Nothing  = return Nothing
          mgetHome end (Just h) = return $ Just $ h ++ end