Added better filepath encoding.