replace droplast for compatibility with older erlang versions
edfs - fix cp dir