Gets the last time that the file was modified.

def getmtime(self, filepath):
        """Gets the last time that the file was modified."""
        if self.is_ssh(filepath):
            self._check_ftp()
            source = self._get_remote(filepath)
            mtime = self.ftp.stat(source).st_mtime
        else:
            mtime = os.path.getmtime(filepath)

        return mtime