Ensure data/ exists
rtrim $rest (hacky, should find better way)