public static function getNewFilename($dst) {
		$fileexts = explode('.', $dst);
		if(count($fileexts) > 1) {
			$filename = implode('.', array_slice($fileexts, 0, -1));
			$ext = $fileexts[count($fileexts)-1];
			$dst = $filename.'.'.$ext;
		}
		else
			$filename = $dst;

		$i=1;
		while(file_exists($dst))
			$dst = $filename.'_'.($i++).(isset($ext) ? '.'.$ext:'');

		return $dst;
	}