Make filepath variable to be always a directory