Added return statements in filesystem.cpp in case of wrong argument (not a directory)