Replace based on filepath, not basename. Bump version to 0.5.0.